<script setup lang="ts">
import { RouterLink, RouterView } from 'vue-router'
import { useRouter } from 'vue-router'
import { ref } from "vue"
import { routes } from "@/router/index"


const keep = routes.filter((item) => {
  return item.meta.keepAlive
}).map(item => {
  // console.log(typeof item.name)
  return item.name
})
console.log("keep", keep)








</script>
<template>

  <div class="main">
    <router-view v-slot="{ Component }">
      <keep-alive :include="keep">
        <component :is="Component" :key="$route.query.idobject" />
      </keep-alive>
    </router-view>
  </div>

</template>

<style scoped>
.main {
  margin-bottom: 30px;
}
</style>
